/*
 *
 *  Copyright (C) 2012-2024
 *  All rights reserved, Designed By 杭州连线客信息技术有限公司
 *  注意：
 *  本软件为杭州连线客信息技术有限公司开发研制，未经购买不得使用
 *  购买后可获得全部源代码（禁止转卖、分享、上传到码云、github等开源平台）
 *  一经发现盗用、分享等行为，将追究法律责任，后果自负
 *
 */

package org.dromara.setting.enums;

import lombok.Getter;
import org.dromara.common.core.constant.Constants;

/**
 * @author heyi
 * 2024/8/15
 */
public interface SettingAllEnums {


    @Getter
    enum WxPayEnums implements BastSettingEnums {


        SLAPPID("slAppId", "服务商应用编号", "微信支付服务商应用编号(slAppId)", "input"),
        SLMCHID("slMchId", "服务商商户号", "微信支付服务商商户号(slMchId)", "input"),
        APPID("appId", "appID", "微信支付appID(appId)", "input"),
        CERT_PATH("certPath", "微信支付证书", "微信支付证书（apiclient_cert.pem），前往微信商家平台生成并黏贴至此处", "input"),
        PARTNER_KEY("partnerKey", "商户API密钥", "微信支付商户API密钥(partnerKey)", "input"),
        MCH_ID("mchId", "微信支付商户号", "微信支付商户号(mchId)", "input"),
        API_KEY("apiKey", "微信支付API密钥", "微信支付API密钥(apiKey)", "input"),
        API_KEY3("apiKey3", "微信支付API密钥3", "微信支付API密钥3(apiKey3)", "input"),
        DOMAIN("domain", "微信支付域名", "微信支付域名(domain)", "input"),
        KEY_PATH("keyPath", "微信支付密钥", "微信支付密钥（apiclient_key.pem），前往微信商家平台生成并黏贴至此处", "input"),
        CERT_P12_PATH("certP12Path", "微信支付证书P12", "微信支付证书P12（apiclient_cert.p12），前往微信商家平台生成并黏贴至此处", "input"),
        WX_PAY_NOTIFY_URL("wxPayNotifyUrl", "微信支付回调地址", "微信支付回调地址", "input"),
        WX_REFUND_NOTIFY_URL("wxRefundNotifyUrl", "微信退款回调地址", "微信退款回调地址", "input"),


        NAME("name", "支付简称", "会员在商城看见的支付名称", "input"),
        ICON("icon", "支付图标", "支付方式图标、建议尺寸：宽100px,jpg,jpeg,png格式", "image_upload"),
        WX_VERSION("wx_version", "微信支付接口版本", "v3", "radio", Constants.SUCCESS),
        MCH_TYPE("mch_type", "商户类型", "普通商户/服务商户", "radio", Constants.SUCCESS),
        SORT("sort", "排序", "排序越小越前", "input"),
        STATE("state", "状态", "", "radio", Constants.SUCCESS);

        public static final String WX_PAY = "WX_PAY";
        public static final String WX_PAY_NAME = "微信支付";
        private final String key;
        private final String keyDesc;
        private final String remark;
        private final String valueInputType;
        private final String defaultValue;

        WxPayEnums(String key, String keyDesc, String remark, String valueInputType, String defaultValue) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = defaultValue;
        }

        WxPayEnums(String key, String keyDesc, String remark, String valueInputType) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = "";
        }

        @Override
        public String getGroupType() {
            return WX_PAY;
        }

        @Override
        public String getName() {
            return WX_PAY_NAME;
        }
    }

    @Getter
    enum BalancePayEnums implements BastSettingEnums {
        NAME("name", "支付简称", "会员在商城看见的支付名称", "input"),
        ICON("icon", "支付图标", "支付方式图标、建议尺寸：宽100px,jpg,jpeg,png格式", "image_upload"),
        SORT("sort", "排序", "排序越小越前", "input", Constants.SUCCESS),
        STATE("state", "状态", "", "radio", Constants.SUCCESS);

        public static final String YUE = "YUE";
        public static final String YUE_NAME = "余额支付";
        private final String key;
        private final String keyDesc;
        private final String remark;
        private final String valueInputType;
        private final String defaultValue;

        BalancePayEnums(String key, String keyDesc, String remark, String valueInputType, String defaultValue) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = defaultValue;
        }

        BalancePayEnums(String key, String keyDesc, String remark, String valueInputType) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = "";
        }

        @Override
        public String getGroupType() {
            return YUE;
        }

        @Override
        public String getName() {
            return YUE_NAME;
        }
    }

    /**
     * 协议枚举
     */
    @Getter
    enum AgreementEnums implements BastSettingEnums {
        USER_AGREEMENT("user_agreement", "用户协议", "用户协议", "rich_text"),
        PRIVACY_POLICY("privacy_policy", "隐私政策", "隐私政策", "rich_text"),
        ABOUT_APP("about_app", "关于App", "关于App", "rich_text");

        public static final String AGREEMENT = "AGREEMENT";
        public static final String USER_AGREEMENT_NAME = "协议";

        private final String key;
        private final String keyDesc;
        private final String remark;
        private final String valueInputType;
        private final String defaultValue;

        AgreementEnums(String key, String keyDesc, String remark, String valueInputType, String defaultValue) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = defaultValue;
        }

        AgreementEnums(String key, String keyDesc, String remark, String valueInputType) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = "";
        }


        @Override
        public String getGroupType() {
            return AGREEMENT;
        }

        @Override
        public String getName() {
            return USER_AGREEMENT_NAME;
        }
    }

    @Getter
    enum WxMpAppConfigEnums implements BastSettingEnums {
        NAME("name", "公众号名称", "", "input"),
        PRIMARY_ID("primaryId", "原始ID", "", "input"),
        QR_CODE("qrCode", "公众号二维码", "建议尺寸：宽400px*高400px。jpg，jpeg，png格式", "image_upload"),
        APP_ID("appId", "AppID", "", "input"),
        APP_SECRET("appSecret", "AppSecret", "", "input"),
        URL("url", "URL", "登录微信公众平台，点击开发>基本配置>服务器配置，填写服务器地址（URL）", "input"),
        TOKEN("token", "Token", "登录微信公众平台，点击开发>基本配置>服务器配置，设置令牌Token。不填默认为“likeshop”", "input"),
        ENCODING_AES_KEY("encodingAesKey", "EncodingAESKey", "消息加密密钥由43位字符组成，字符范围为A-Z,a-z,0-9", "input"),
        //1=明文 2=兼容 3=安全
        ENCRYPTION_TYPE("encryptionType", "消息加密方式", "明文模式 (不使用消息体加解密功能，安全系数较低)/兼容模式 (明文、密文将共存，方便开发者调试和维护)/安全模式（推荐） (消息包为纯密文，需要开发者加密和解密，安全系数高)", "radio"),
        BUSINESS_DOMAIN("businessDomain", "业务域名", "登录微信公众平台，点击设置>公众号设置>功能设置，填写业务域名", "input"),
        JS_DOMAIN("jsDomain", "JS接口安全域名", "登录微信公众平台，点击设置>公众号设置>功能设置，填写JS接口安全域名", "input"),
        WEB_DOMAIN("webDomain", "网页授权域名", "登录微信公众平台，点击设置>公众号设置>功能设置，填写网页授权域名", "input");

        public static final String WX_MP = "WX_MP";
        public static final String WX_MINI_NAME = "微信公众号";
        private final String key;
        private final String keyDesc;
        private final String remark;
        private final String valueInputType;
        private final String defaultValue;

        WxMpAppConfigEnums(String key, String keyDesc, String remark, String valueInputType, String defaultValue) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = defaultValue;
        }

        WxMpAppConfigEnums(String key, String keyDesc, String remark, String valueInputType) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = "";
        }

        @Override
        public String getGroupType() {
            return WX_MP;
        }

        @Override
        public String getName() {
            return WX_MINI_NAME;
        }
    }


    @Getter
    enum WxMiniAppItemEnums implements BastSettingEnums {
        APP_ID("appId", "AppID", "", "input"),
        APP_SECRET("appSecret", "AppSecret", "", "input"),
        BUSINESS_DOMAIN("businessDomain", "业务域名", "小程序账号登录微信公众平台，点击开发>开发设置->业务域名，填写业务域名", "input"),
        DOWNLOAD_FILE_DOMAIN("downloadFileDomain", "downloadFile合法域名", "小程序账号登录微信公众平台，点击开发>开发设置->服务器域名，填写https协议域名", "input"),
        NAME("name", "小程序名称", "", "input"),
        PRIMARY_ID("primaryId", "原始ID", "", "input"),
        QR_CODE("qrCode", "小程序码", "建议尺寸：宽400px*高400px。jpg，jpeg，png格式", "image_upload"),
        REQUEST_DOMAIN("requestDomain", "request合法域名", "小程序账号登录微信公众平台，点击开发>开发设置->服务器域名，填写https协议域名", "input"),
        SOCKET_DOMAIN("socketDomain", "socket合法域名", "小程序账号登录微信公众平台，点击开发>开发设置->服务器域名，填写https协议域名", "input"),
        TCP_DOMAIN("tcpDomain", "tcp合法域名", "小程序账号登录微信公众平台，点击开发>开发设置->服务器域名，填写tcp域名", "input"),
        UDP_DOMAIN("udpDomain", "udp合法域名", "小程序账号登录微信公众平台，点击开发>开发设置->服务器域名，填写udp域名", "input"),
        UPLOAD_FILE_DOMAIN("uploadFileDomain", "downloadFile合法域名", "小程序账号登录微信公众平台，点击开发>开发设置->服务器域名，填写https协议域名", "input");
        public static final String WX_MINI_APP = "WX_MINI_APP";
        public static final String WX_MINI_NAME = "微信小程序";
        private final String key;
        private final String keyDesc;
        private final String remark;
        private final String valueInputType;
        private final String defaultValue;

        WxMiniAppItemEnums(String key, String keyDesc, String remark, String valueInputType, String defaultValue) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = defaultValue;
        }

        WxMiniAppItemEnums(String key, String keyDesc, String remark, String valueInputType) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = "";
        }

        @Override
        public String getGroupType() {
            return WX_MINI_APP;
        }

        @Override
        public String getName() {
            return WX_MINI_NAME;
        }
    }

    @Getter
    enum AliPayEnums implements BastSettingEnums {
        ALI_APP_ID("aliAppId", "应用ID", "支付宝应用APP_ID"),
        ALI_PRIVATE_KEY("aliPrivateKey", "应用私钥", "应用私钥(private_key)"),
        ALI_PAY_PUBLIC_KEY("aliPayPublicKey", "支付宝公钥", "支付宝公钥(ali_public_key)"),
        ALI_APP_CERT_PATH("aliAppCertPath", "应用公钥证书", "应用公钥证书(app_cert_path)"),
        ALI_PAY_ROOT_CERT_PATH("aliPayRootCertPath", "支付宝根证书", "支付宝根证书(alipay_root_cert_path)"),
        ALI_PAY_CERT_PATH("aliPayCertPath", "支付宝公钥证书", "支付宝公钥证书(alipay_cert_path)"),
        SERVER_URL("serverUrl", "支付网关", "支付宝支付网关"),
        ALI_NOTIFY_URL("aliNotifyUrl", "支付回调地址", "支付宝支付回调地址"),
        ALI_REFUND_URL("aliRefundUrl", "退款回调地址", "支付宝退款回调地址"),

        NAME("name", "支付简称", "会员在商城看见的支付名称"),
        ICON("icon", "支付图标", "支付方式图标、建议尺寸：宽100px,jpg,jpeg,png格式", "image_upload"),
        // 1=普通模式2=证书模式
        PAY_MODE("pay_mode", "模式", "普通模式/证书模式", "radio"),
        //  1=普通商户2=服务商户
        MCH_TYPE("mch_type", "商户类型", "普通商户/服务商户", "radio"),
        SORT("sort", "排序", "排序越小越前"),
        STATE("state", "状态", "", "radio", Constants.SUCCESS);

        public static final String ALL_PAY = "ALL_PAY";
        public static final String ALL_PAY_NAME = "支付宝";
        private final String key;
        private final String keyDesc;
        private final String remark;
        private final String valueInputType;
        private final String defaultValue;

        AliPayEnums(String key, String keyDesc, String remark, String valueInputType, String defaultValue) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = defaultValue;
        }

        AliPayEnums(String key, String keyDesc, String remark, String valueInputType) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = "input";
            this.defaultValue = "";
        }

        AliPayEnums(String key, String keyDesc, String remark) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = "input";
            this.defaultValue = "";
        }


        @Override
        public String getGroupType() {
            return ALL_PAY;
        }

        @Override
        public String getName() {
            return ALL_PAY_NAME;
        }
    }

    @Getter
    enum LxkOpenApiEnums implements BastSettingEnums {
        LXK_ACCESS_KEY("lxk_access_key", "连线客access_key", "连线客access_key"),
        LXK_SECRET_KEY("lxk_secret_key", "连线客secret_key", "连线客secret_key"),
        SMS_SIGN_ID("sms_sign_id", "短信签名id", "短信签名id"),
        TEMPLATE_ID("template_id", "短信模板id", "短信模板id");

        public static final String LXK_OPEN_API = "LXK_OPEN_API";
        public static final String LXK_OPEN_API_NAME = "连线客api配置";
        private final String key;
        private final String keyDesc;
        private final String remark;
        private final String valueInputType;
        private final String defaultValue;


        LxkOpenApiEnums(String key, String keyDesc, String remark, String valueInputType, String defaultValue) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = defaultValue;
        }

        LxkOpenApiEnums(String key, String keyDesc, String remark, String valueInputType) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = "";
        }

        LxkOpenApiEnums(String key, String keyDesc, String remark) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = "input";
            this.defaultValue = "";
        }

        @Override
        public String getGroupType() {
            return LXK_OPEN_API;
        }

        @Override
        public String getName() {
            return LXK_OPEN_API_NAME;
        }
    }

    @Getter
    enum OmsOrderEnums implements BastSettingEnums {
        API_ID("api_id", "商户编号", "商户编号"),
        PAY_EXPIRE_TIME("pay_expire_time", "支付的过期时间", "支付的过期时间"),
        RECEIVE_EXPIRE_TIME("receive_expire_time", "收货的过期时间", "收货的过期时间"),
        COMMENT_EXPIRE_TIME("comment_expire_time", "评论的过期时间", "评论的过期时间");

        public static final String LXK_OMS_ORDER = "LXK_OMS_ORDER";
        public static final String LXK_OMS_ORDER_NAME = "连线客订单设置";
        private final String key;
        private final String keyDesc;
        private final String remark;
        private final String valueInputType;
        private final String defaultValue;

        OmsOrderEnums(String key, String keyDesc, String remark, String valueInputType) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = valueInputType;
            this.defaultValue = "";
        }

        OmsOrderEnums(String key, String keyDesc, String remark) {
            this.key = key;
            this.keyDesc = keyDesc;
            this.remark = remark;
            this.valueInputType = "input";
            this.defaultValue = "";

        }

        @Override
        public String getGroupType() {
            return LXK_OMS_ORDER;
        }

        @Override
        public String getName() {
            return LXK_OMS_ORDER_NAME;
        }
    }
}
